<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    *{
        margin: 0;
        padding: 0;
    }
    .pass{
      display: flex;
      justify-content: space-around;
      margin: 20px;
    }
    .pass input{
        width: 200px;
    }
     /* .pass span{
        width: 20px;
    } */
    .s1{
        margin: 20px;
    }
    h2{
        margin: 20px;
    }
   .del{
    margin-left: 80px;
   }
</style>
<body>
    <div id="app">
     <div class="pass">
        <input type="text" placeholder="搜索商家、商品名称" v-model="arr1">
        <span @click="search">搜索</span>
     </div>
     <h2>历史搜索<span class="del"  @click="del">删除</span></h2>
   
      <span class="s1" v-for="(item,index) in arr">{{item}}</span>
     



    </div>
</body>
</html>
<script src="./vue-2.5.21.js"></script>
<script src="3.搜索框.js"></script>